package com.example.superoa.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the rinterview database table.
 * 
 */
@Entity
@NamedQuery(name="Rinterview.findAll", query="SELECT r FROM Rinterview r")
public class Rinterview implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int riviewid;

	private String riviewcontent;

	private String riviewname;

	private String riviewoption;

	@Temporal(TemporalType.TIMESTAMP)
	private Date riviewtime;

	private String riviewway;
	
	private int riviewqi;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="staff_id")
	private Staff staff;

	//bi-directional many-to-one association to Rinterviewer
	@OneToMany(mappedBy="rinterview")
	private List<Rinterviewer> rinterviewers;

	public Rinterview() {
	}

	public int getRiviewid() {
		return this.riviewid;
	}

	public void setRiviewid(int riviewid) {
		this.riviewid = riviewid;
	}

	public String getRiviewcontent() {
		return this.riviewcontent;
	}

	public void setRiviewcontent(String riviewcontent) {
		this.riviewcontent = riviewcontent;
	}

	public String getRiviewname() {
		return this.riviewname;
	}

	public void setRiviewname(String riviewname) {
		this.riviewname = riviewname;
	}

	public String getRiviewoption() {
		return this.riviewoption;
	}

	public void setRiviewoption(String riviewoption) {
		this.riviewoption = riviewoption;
	}

	public Date getRiviewtime() {
		return this.riviewtime;
	}

	public void setRiviewtime(Date riviewtime) {
		this.riviewtime = riviewtime;
	}

	public String getRiviewway() {
		return this.riviewway;
	}

	public void setRiviewway(String riviewway) {
		this.riviewway = riviewway;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<Rinterviewer> getRinterviewers() {
		return this.rinterviewers;
	}

	public void setRinterviewers(List<Rinterviewer> rinterviewers) {
		this.rinterviewers = rinterviewers;
	}

	public Rinterviewer addRinterviewer(Rinterviewer rinterviewer) {
		getRinterviewers().add(rinterviewer);
		rinterviewer.setRinterview(this);

		return rinterviewer;
	}

	public Rinterviewer removeRinterviewer(Rinterviewer rinterviewer) {
		getRinterviewers().remove(rinterviewer);
		rinterviewer.setRinterview(null);

		return rinterviewer;
	}

	public int getRiviewqi() {
		return riviewqi;
	}

	public void setRiviewqi(int riviewqi) {
		this.riviewqi = riviewqi;
	}
	
}